package com.yvan.serverless;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@Getter
@Setter
@ConfigurationProperties(prefix = "serverless")
public class ServerLessProperties {

    private TypescriptProperties typescript;
    private YvanUIDesignProperties design;
    private List<UrlMapping> client;
    private CompileProperties compile;
    private ESProperties es;

    @Getter
    @Setter
    public static class CompileProperties {
        private Boolean auto;
        private String client;
        private String server;
        private Boolean reloadEngine;
    }

    @Getter
    @Setter
    public static class TypescriptProperties {
        private Boolean inspect;
        private Integer inspectPort;
        private String url;
        private String srcLocation;
        private String distLocation;
    }

    @Getter
    @Setter
    public static class ESProperties {
        private String[] address;
    }

    @Getter
    @Setter
    public static class UrlMapping {
        private String url;
        private String location;
        private String cache;
    }
}
